package zjhr.com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import zjhr.com.pojo.EasyUIPageQuery;
import zjhr.com.pojo.Recruitplan;
import zjhr.com.service.RecruitPlanService;
import zjhr.com.utils.JsonUtils;

@Controller
public class RecruitPlanController {
	@Autowired
	private RecruitPlanService recruitPlanService;
	//添加招聘计划
	@RequestMapping(value="/addRecriutPlan.action",method=RequestMethod.POST)
	public String save(Recruitplan recruitPlan){
		recruitPlanService.save(recruitPlan);
		return "/yewu/recruitPlan.jsp";
	}
	
	@RequestMapping("/recruitPlanPageQuery.action")
	@ResponseBody
	public String pageQuery(Integer page,Integer rows){
		EasyUIPageQuery pageQuery = recruitPlanService.pageQuery(page, rows);
		return JsonUtils.objectToJson(pageQuery);
		
	}

}
